Spell Checking in Grids

RapidSpellDialog

DataGridView

The DataGridView example in the demo projects give a code example.

1. Add the RapidSpellDialog control to the form

2. Set IgnoreIncorrectSentenceCapitalization = true

3. Add this method to the form with the DataGridView

	void RefreshSpell()
        {
            rsd.ClearTextComponents();

            //create text components for all cells of interest
            foreach (DataGridViewRow r in dataGridView1.Rows)
            {
                rsd.AddTextComponent(new SpellCheckableDataGridViewCell(r.Cells[0]));
                rsd.AddTextComponent(new SpellCheckableDataGridViewCell(r.Cells[1]));
            }
        }

The loop should be changed to call AddTextComponent with every cell that should be spell checked in the row.

4. Launch the spell check by calling

	RefreshSpell();
	rsd.Check();

RapidSpellAsYouType

Supports various grid controls.

DataGridView

The DataGridView example in the demo projects give a code example.

1. Add Keyoti.RapidSpell.Grid.DataGridView_AYT_Manager control to the form

2. Set it's DataGridView property to the instance of the DataGridView to work with.

3. Set it's RapidSpellAsYouType property to the instance of RapidSpellAsYouType to work with

4. In the designer, right click on the grid and choose Edit Columns.

5. Select columns to be spell checked and set each column's ColumnType to "AYTDataGridViewTextBoxColumn" - if it is not available in the list, ensure that Keyoti.RapidSpell.NETX.DLL is referenced and the project has been built.

DataGrid

The DataGrid example in the demo projects give a code example - in particular refer to the method AddCustomDataTableStyle(). This method performs the following;

1. Create an instance of DataGridTableStyle.

2. Create a DataGridAYTTextBoxColumn, and give it a RapidSpellAsYouType instance.

3. Add the DataGridAYTTextBoxColumn to the DataGridTableStyle with the MappingName set to ensure the column editor will be used to edit the desired column.

4. Add the DataGridTableStyle to the DataGrid's TableStyles property.

DevExpress XtraGrid

Please consult the VS demos and http://keyoti.com/kb/Default.aspx?ToDo=view&questId=139 for an up to date KB article.

Janus GridEX

Please consult the VS demos and http://keyoti.com/kb/Default.aspx?ToDo=view&questId=58 for an up to date KB article.